﻿using System;
using System.Text;
using System.Web.UI;
using Microsoft.Live.ServerControls.VE;

namespace Microsoft.Live.ServerControls.Web.ServerSideEvents
{
    public partial class Events : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void myMap_ServerChangeView(object sender, MapEventArgs e)
        {
            StringBuilder str = new StringBuilder();
            str.Append("Server Event OnChangeView<br/>");
            EventFiredinfo.Text += str.ToString();
        }

        protected void myMap_ServerChangeMapStyle(object sender, MapEventArgs e)
        {
            StringBuilder str = new StringBuilder();
            str.Append("Server Event OnChangeMapStyle<br/>");
            EventFiredinfo.Text += str.ToString();
        }

        protected void myMap_ServerClick(object sender, MapEventArgs e)
        {
            StringBuilder str = new StringBuilder();
            str.Append("Server Event OnClick<br/>");
            str.Append("Latitude: ");
            str.Append(e.latLong.Latitude);
            str.Append("<br/>");
            str.Append("Longitude: ");
            str.Append(e.latLong.Longitude);
            str.Append("<br/>");
            EventFiredinfo.Text += str.ToString();
        }

        protected void myMap_ServerDoubleClick(object sender, MapEventArgs e)
        {
            StringBuilder str = new StringBuilder();
            str.Append("Server Event OnDoubleClick<br/>");
            str.Append("Latitude: ");
            str.Append(e.latLong.Latitude);
            str.Append("<br/>");
            str.Append("Longitude: ");
            str.Append(e.latLong.Longitude);
            str.Append("<br/>");
            EventFiredinfo.Text += str.ToString();
        }
    }
}